<template>
  <div class="loading">
    <loading :color="color" :vertical="vertical" :size="size">
      <slot>
        <div>加载中...</div>
      </slot>
    </loading>
  </div>
</template>

<script>
import { Loading } from "vant";

export default {
  components: {
    Loading
  },
  props: {
    color: {
      type: String,
      default: "#c9c9c9"
    },
    vertical: {
      type: Boolean,
      default: false
    },
    size: {
      type: String,
      default: '18px',
    }
  }
};
</script>

<style scoped>
.loading {
  padding-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  box-sizing: border-box;
}
</style>